package com.qyb.config;

import javax.websocket.Endpoint;
import javax.websocket.server.ServerApplicationConfig;
import javax.websocket.server.ServerEndpointConfig;
import java.util.Set;

/**
 * <p>
 * 实现功能：
 * <p/>
 *
 * @author 秦有宝
 * @version 1.0.00
 */
public class MyConfig implements ServerApplicationConfig {
    /**
     * Enables applications to filter the discovered implementations of
     * {@link ServerEndpointConfig}.
     *
     * @param scanned The {@link Endpoint} implementations found in the
     *                application
     * @return The set of configurations for the endpoint the application
     * wishes to deploy
     */
    @Override
    public Set<ServerEndpointConfig> getEndpointConfigs(Set<Class<? extends Endpoint>> scanned) {
        return null;
    }

    /**
     * Enables applications to filter the discovered classes annotated with
     * {@link ServerEndpoint}.
     *
     * @param scanned The POJOs annotated with {@link ServerEndpoint} found in
     *                the application
     * @return The set of POJOs the application wishes to deploy
     */
    @Override
    public Set<Class<?>> getAnnotatedEndpointClasses(Set<Class<?>> scanned) {
        System.out.println("启动"+scanned.size());
        //返回，提供了过滤作用
        return scanned;
    }
}
